package com.ljkj.blockpay;

import android.app.Application;
import android.content.Context;
import android.database.DefaultDatabaseErrorHandler;
import android.util.Log;

import com.kongzue.baseokhttp.listener.ResponseInterceptListener;
import com.kongzue.baseokhttp.util.BaseOkHttp;
import com.kongzue.baseokhttp.util.Parameter;
import com.ljkj.blockpay.basedata.BuildConfig;
import com.ljkj.blockpay.util.GlobalContext;


public class BlockApplication extends Application {
    public static Context context;

    @Override
    public void onCreate() {
        super.onCreate();
        context = this;
        BaseOkHttp.DEBUGMODE = true;
        BaseOkHttp.serviceUrl = BuildConfig.BASE_API_SERVICE;

        BaseOkHttp.responseInterceptListener = new ResponseInterceptListener() {
            @Override
            public boolean onResponse(Context context, String url, String response, Exception error) {
                if (error != null) {
                    return false;
                } else {
                    Log.i("!!!", "onResponse: " + response);
                    return true;
                }
            }
        };
    }


}
